{include file="public/layout" /}
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    {include file="admin/admin_bar" /}
    <div class="flexigrid">
        <div class="mDiv">
            <div class="ftitle">
                <h3>管理员列表</h3>
                <h5>(共{$pager->totalRows}条记录)</h5>
            </div>
            <div title="刷新数据" class="pReload"><i class="fa fa-refresh"></i></div>
            <form class="navbar-form form-inline" action="{:U('Admin/index')}" method="get" onsubmit="layer_loading('正在处理');">
                <div class="sDiv">
                    <div class="sDiv2">
                        <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="搜索相关数据...">
                        <input type="submit" class="btn" value="搜索">
                    </div>
                    <div class="sDiv2">
                        <input type="button" class="btn" value="重置" onClick="window.location.href='{:U('Admin/index')}';">
                    </div>
                </div>
            </form>
        </div>
        <div class="hDiv">
            <div class="hDivBox">
                <table cellspacing="0" cellpadding="0" style="width: 100%">
                    <thead>
                    <tr>
                        <th class="sign w40" axis="col0">
                            <div class="tc">选择</div>
                        </th>
                        <th abbr="article_title" axis="col3" class="w40">
                            <div class="tc">ID</div>
                        </th>
                        <th abbr="ac_id" axis="col4">
                            <div class="tl" style="padding-left: 10px;">用户名</div>
                        </th>
                        <th abbr="ac_id" axis="col4" class="w100">
                            <div class="tl">真实姓名</div>
                        </th>
                        <th abbr="article_show" axis="col5" class="w100">
                            <div class="tl">所属角色</div>
                        </th>
                        <th abbr="article_time" axis="col6" class="w120">
                            <div class="tc">手机号码</div>
                        </th>
                        <th abbr="article_time" axis="col6" class="w160">
                            <div class="tc">最后登录时间</div>
                        </th>
                        <th axis="col1" class="w120">
                            <div class="tc">操作</div>
                        </th>
                        
                    </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="bDiv" style="height: auto; min-height: auto;">
            <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                <table style="width: 100%">
                    <tbody>
                    {empty name="list"}
                        <tr>
                            <td class="no-data" align="center" axis="col0" colspan="50">
                                <i class="fa fa-exclamation-circle"></i>没有符合条件的记录
                            </td>
                        </tr>
                    {else/}
                        {foreach name="list" item="vo" key="k" }
                        <tr>
                            <td class="sign">
                                <div class="w40 tc">
                                    {neq name="$vo.admin_id" value="$Think.session.admin_id"}
                                    <input type="checkbox" name="ids[]" value="{$vo.admin_id}">
                                    {/neq}
                                </div>
                            </td>
                            <td class="">
                                <div class="w40 tc">{$vo.admin_id}</div>
                            </td>
                            <td style="width: 100%">
                                <div style="padding-left: 10px;">
                                    {eq name="'Admin@admin_edit'|is_check_access" value="1"}
                                    <a href="{:U('Admin/admin_edit',array('id'=>$vo['admin_id']))}">{$vo.user_name}</a>
                                    {else /}
                                    {$vo.user_name}
                                    {/eq}
                                </div>
                            </td>
                            <td>
                                <div class="w100">
                                    {$vo.true_name}
                                </div>
                            </td>
                            <td>
                                <div class="w100">{$vo.role_name|default='<em class="red">数据出错</em>'}</div>
                            </td>
                            <td>
                                <div class="w120">
                                    {$vo.mobile}
                                </div>
                            </td>
                            <td class="">
                                <div class="tc w160">{$vo.last_login|date='Y-m-d H:i:s',###}</div>
                            </td>
                            <td class="">
                                <div class="w120 tc">
                                    {eq name="'Admin@admin_edit'|is_check_access" value="1"}
                                    <a href="{:U('Admin/admin_edit',array('id'=>$vo['admin_id']))}" class="btn blue"><i class="fa fa-pencil-square-o"></i>编辑</a>
                                    {/eq}
                                    {neq name="$vo.admin_id" value="$Think.session.admin_id"}
                                        {eq name="'Admin@admin_del'|is_check_access" value="1"}
                                        <a class="btn red"  href="javascript:void(0);" data-url="{:U('Admin/admin_del')}" data-id="{$vo.admin_id}" onClick="delfun(this);"><i class="fa fa-trash-o"></i>删除</a>
                                        {/eq}
                                    {/neq}
                                </div>
                            </td>
                            
                        </tr>
                        {/foreach}
                    {/empty}
                    </tbody>
                </table>
            </div>
            <div class="iDiv" style="display: none;"></div>
        </div>
        <div class="tDiv">
            <div class="tDiv2">
                <div class="fbutton checkboxall">
                    <input type="checkbox" onclick="javascript:$('input[name*=ids]').prop('checked',this.checked);">
                </div>
                {eq name="'Admin@admin_del'|is_check_access" value="1"}
                <div class="fbutton">
                    <a onclick="batch_del(this, 'ids');" data-url="{:U('Admin/admin_del')}">
                        <div class="add" title="批量删除">
                            <span><i class="fa fa-close"></i>批量删除</span>
                        </div>
                    </a>
                </div>
                {/eq}
            </div>
            <div style="clear:both"></div>
        </div>
        <!--分页位置-->
        {$page} </div>
</div>
<script>
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid > table>tbody >tr').click(function(){
            $(this).toggleClass('trSelected');
        });

        // 点击刷新数据
        $('.fa-refresh').click(function(){
            location.href = location.href;
        });
    });
</script>

{include file="public/footer" /}